package com.xuecheng.learning.service;

import com.xuecheng.commons.model.dto.LearningProgressDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.RecordDto;
import com.xuecheng.commons.model.vo.CourseRecordVo;
import com.xuecheng.commons.model.vo.ResourceVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.learning.domain.CourseRecord;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 选课记录 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-12-12
 */
public interface CourseRecordService extends IService<CourseRecord> {

    //课程记录查询
    ResponseResult<CourseRecordVo> myCourseRec(Long coursePubId);
    //支付成功，保存或者更新选课记录
    ResponseResult saveRecord(RecordDto dto);

    //课程详情获取媒资地址
    ResponseResult<ResourceVo> resourceUrl(Long coursePubId, Long mediaId, Long teachplanId);

    //保存学习进度
    ResponseResult progress(LearningProgressDto dto);
    //个人中心选课信息列表
    ResponseResult<CourseRecordVo> findRecordsByPage(PageRequest pageRequest);
}
